#ifndef __NewMath__DataFile__
#define __NewMath__DataFile__

#include "cocos2d.h"
USING_NS_CC;

struct DataResult
{
public:
	char** data;
	int length;
};

class DataFile
{
private:
	static int getCountLine(FILE* fp, int lengthLine);
	static DataResult readBuffer(FILE* fp, int lengthLine);

public:
	static DataResult readFile(const char* filename, int lengthLine);
	static char* getRow(char** data, int row);
	static DataResult split(char* data, const char* delim);
};

#endif